from django.db import models
from django.contrib.auth.models import User

class Category(models.Model):
    id = models.AutoField(primary_key=True)
    title = models.CharField(max_length=100)
    description = models.CharField(max_length=3000)

class Dit(models.Model):
    id = models.AutoField(primary_key=True)
    user = models.ForeignKey(User)
    category = models.ForeignKey(Category)
    text = models.CharField(max_length=140)
    url = models.URLField()
    cover = models.BooleanField(default=False)
    create_at = models.DateField(auto_now=True)
